1) open e:\weblogic\weblogic.properties:
-----------------------------------
search for a property called WEBLOGIC JDBC CONNECTION POOL MANAGEMENT
-----------------------------------
uncomment the below properties if they are in comments.

# There is one statement #that set ACL to users to #use  Pool of DB #connections.

weblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=\everyone

# Below property assigns #the JNDI name to #oraclePool
weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.demoPool=oraclePool

save & exit
-----------------------------------
2) open weblogic-ejb-jar.xml

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>shopBean</ejb-name>
<caching-descriptor>
<max-beans-in-cache>10</max-beans-in-cache>
</caching-descriptor>

<reference-descriptor>
 <resource-description>
  <res-ref-name>
          jdbc/demoPool
  </res-ref-name>
  <jndi-name>          weblogic.jdbc.jts.demoPool
  </jndi-name>   </resource-description>
</reference-descriptor>

</weblogic-enterprise-bean>
</weblogic-ejb-jar>

ejb-jar.xml
---------------
</env-entry>

<resource-ref>        <res-ref-name>jdbc/demoPool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>  <res-auth>Container</res-auth>
</resource-ref>
</session>

In EJB class
p class Shop 
----------------
public void ejbCreate(int accNo, String pass) throws CreateException
{
this.accNo=accNo;
this.pass=pass;
try
{
javax.naming.Context ctxt=new javax.naming.InitialContext();

Object o=ctxt.lookup("java:comp/env/jdbc/demoPool");

javax.sql.DataSource ds=(javax.sql.DataSource)o;

con=ds.getConnection();

stmt=con.createStatement();
}
